<h1>Listing <%= @document_category.name %> documents</h1>

<table>
  <tr>
    <th>Name</th>
  </tr>

<% for document in @documents %>
  <tr>
    <td><%=h document.name %></td>
    <td><%= link_to 'Show', document_category_document_path(params[:document_category_id],document) %></td>
    <td><%= link_to 'Edit', edit_document_category_document_path(params[:document_category_id],document) %></td>
    <td><%= link_to 'Destroy',document_category_document_path(params[:document_category_id],document), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<div class="actions">
  <%= link_to 'New Document', new_document_category_document_path(@document_category.id) %>
</div>
